import * as API_Message from '../../api/message'

Page({
  data: {
    no_read:'',
    page_size:10,
    page_no:1
  },
  onShow(){
    this.getNoReadMessageNum()
  },
  getNoReadMessageNum(){
    API_Message.getMesssagesAsUnread({
      page_no:this.data.page_no,
      page_size:this.data.page_size,
      read:0
    }).then(response=>{
      this.setData({no_read:response})
    })
  }
})